<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
</html>

<script>
  var year = 2024;
  var month = 12;
  var day = 7;
  var totalday = 0;
  switch (month - 1) {
    case 11:
      totalday += 30;
    case 10:
      totalday += 31;
    case 9:
      totalday += 30;
    case 8:
      totalday += 31;
    case 7:
      totalday += 31;
    case 6:
      totalday += 30;
    case 5:
      totalday += 31;
    case 4:
      totalday += 30;
    case 3:
      totalday += 31;
    case 2:
      totalday += 28;
    case 1:
      totalday += 31;
  }
  totalday += day;
  console.log(totalday);
</script>
